<?php
/**
 * Created by PhpStorm.
 * User: maqun
 * Date: 2016/2/29
 * Time: 13:04
 * 新闻模型
 */
class NewsModel extends BaseModel{

    protected $tableName = "news";//数据库表名

    /**
     * @param string $where
     * @return array|mixed
     * 获取新闻列表
     */
    public function  getNewsList($where=''){

        $list = $this->where($where)
                ->order('time DESC')
                ->select();
        return !empty($list) ? $list : array();
    }
}